export default {
    namespaced: true,
    state: {
        userInfo: {
            name: '',
            username: '',
            roles: ''
        }
    },
    mutations: {
        setInfo(state, payload) {
            state.userInfo = payload;
        },
        setRoles(state, payload) {
            state.userInfo.roles = payload;
        }
    },
    actions: {
        updateRolesInfo({ commit }, obj) {
            commit('setRoles', obj);
        }
    }
};
